import request from "@/utils/request";

/**
 * @description 列表
 * @param params
 * @returns {*}
 */
export function list(params){
    return request({
        url:'/integralOrder/getAdminIntegralOrderList',
        method:'GET',
        params
    })
}
/**
 * @description 新增/编辑
 * @param data
 * @returns {*}
 */
export function save(data){
    return request({
        url:'/integralOrder/addAndUpdateIntegralOrder',
        method:'POST',
        data
    })
}

export function refundReview(status,orderSn,refundRemarks){
    return request({
        url:'/integralOrder/refundReview',
        method:'GET',
        params:{status,orderSn,refundRemarks}
    })
}
/**
 * @description 删除
 * @param id
 * @returns {*}
 */
export function deleteRow(id){
    return request({
        url:'/integralOrder/delIntegralOrder',
        method:'GET',
        params:{id}
    })
}

/**
 * @description 详情
 * @param id
 * @returns {*}
 */
export function detail(id){
    return request({
        url:'/integralOrder/getIntegralOrderById',
        method:'GET',
        params:{id}
    })
}

/**
 * 获取快递公司列表
 * @returns {*}
 */
export function getCategoryList(){
    return request({
        url:'/integralOrder/getCategoryList',
        method:'GET'
    })
}

export function getAwardInfoList(params){
    return request({
        url:'/awardInfo/getAwardInfoList',
        method:'GET',
        params
    })
}

/**
 * @description 中奖记录
 * @param id
 * @returns {*}
 */
export function winningRecord(params){
    return request({
        url:'/lotteryRecord/admin/lotteryRecord',
        method:'GET',
        params
    })
}

export function recordDetail(id){
    return request({
        url:'/lotteryRecord/admin/recordDetail',
        method:'GET',
        params:{id}
    })
}

export function send(data){
    return request({
        url:'/lotteryRecord/admin/send',
        method:'POST',
        data
    })
}

/**
 * @description 导出订单记录
 * @param id
 * @param status
 * @returns {*}
 */
export function exportOrderRecords(data){
    return request({
        url:'/excel/orderExcel',
        method:'GET',
        params:data,
        responseType: 'blob'
    })
}


/**
 * @description 导出
 * @param id
 * @returns {*}
 */
export function downLoadVoucherInfoExcel(params){
    return request({
        url:'/voucherRecord/downLoadVoucherInfoExcel',
        method:'GET',
        params,
        responseType: 'arraybuffer'
    })
}

export function getOrders(){
    return request({
        url:'/order/getOrders',
        method:'GET'
    })
}
